<?php

require_once('inc.config.php');

$useTemplate   = 'agent_admin_qglist.html';

if(!isLogin(0)){header("Location:register.php?msg=error3");}

$page = new QuickSkin ($useTemplate );

template_ini($page);

$order = $_REQUEST["order"];
if(!isset($order)){$order=1;}

$type = $_REQUEST["type"];
if(!isset($type)){$type=0;}

$infoid = $_REQUEST["infoid"];
if(!isset($infoid)){$infoid="";}

$ispublic = $_REQUEST["ispublic"];
if(!isset($ispublic)){$ispublic=0;}

$p = $_REQUEST["r_page"];
if(!isset($p)){$p=1;}

$condition = array(
	"ruserid" => __user_id__,
	"ruserprop" => __user_prop__,
	"infoid" => $infoid,
	"type" => $type,
	"ispublic" => $ispublic
);


$result = $myQgqzhouse->getQgList($condition , $order , $p);
$totalpage = $myQgqzhouse->getSearchPage($condition , __admin_qghouse_num__);

$page->assign("indexcls" , "bfont");
$page->assign("type" , $type);
$page->assign("qglist" , $result);
$page->assign("order" , $order);
$page->assign("ispublic" , $ispublic);
$page->assign("r_page" , $p);
$page->assign("totalpage" , $totalpage);

require_once("agent_admin_left.php");
if($type==0){
	$page->assign("selected2_3" , "selected");
	if($ispublic==0){
		$page->assign("param" , "qg_up");
	}else{
		$page->assign("param" , "qg_down");
	}
}else{
	$page->assign("selected2_4" , "selected");
	if($ispublic==0){
		$page->assign("param" , "qz_up");
	}else{
		$page->assign("param" , "qz_down");
	}
}


$page->output();


ob_end_flush();

?>
